<form method="post" action="{% url "election@password-voter-login" election.uuid %}" onsubmit="show_waiting()">
<input type="hidden" name="csrf_token" value="{{csrf_token}}" />
<input type="hidden" name="return_url" value="{{return_url}}" />
<input type="hidden" name="cast_ballot" value="{{cast_ballot}}" />

<div style="border: 1px solid #888; padding: 10px; max-width: 500px;">
{{password_login_form.as_p}}
{% if bad_voter_login %}
<p style="color: red;">
bad voter ID or password, please try again.
</p>
{% endif %}
{% if cast_ballot == "1" %}
<input type="submit" class="button" value="authenticate &amp; cast ballot" />
<p class="small">
  Your voter ID and password can be found in the email you received.
  If you cannot find your login information, contact your election administrator at <tt>{{election.help_email}}</tt>.
</p>
<p class="small">
Cast as many ballots as you wish: only the last one counts.
</p>
{% else %}
<input type="submit" class="button" value="log in" />
{% endif %}
</form>
</div>


